package com.t8;
import static net.mindview.util.Print.*;

/**
 * Created by xuyiwei on 2018/7/19.
 */
class Glyph {
    void draw() { print("Glyph.draw()"); }
    Glyph() {
        print("Glyph() before draw()");
        draw();
        print("Glyph() after draw()");
    }
}

class RoundGlyph extends Glyph {
    private Integer radius = 1;
    RoundGlyph(int r) {
        radius = r;
        print("RoundGlyph.RoundGlyph(), radius = " + radius);
    }
    void draw() {
        print("RoundGlyph.draw(), radius = " + radius);
    }
}



public class PolyConstructors {
    public static void main(String[] args) {
        new RoundGlyph(5);
    }
    /**
     *Glyph() before draw()
     RoundGlyph.draw(), radius = 0
     Glyph() after draw()
     RoundGlyph.RoundGlyph(), radius = 5
     */
}